/**
* Copyright (c) 2016-2100 yunclouds
*/
package com.yunqian.redot.repository;

import com.yunqian.redot.domain.Contents;
import com.yunqian.repository.BaseRepository;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * 业务数据内容数据表（有顺序图或文字）
 *
 * @author zsy
 * 2018-09-29 15:53:53
 */
@Repository
public interface ContentsRepository extends BaseRepository<Contents, Long> {

    /**
     * 查找关联详情内容
     * @param relateBusiness
     * @param relateId
     * @return
     */
    List<Contents> findAllByRelateBusinessAndRelateId(Integer relateBusiness, Long relateId);

    @Modifying
    void deleteByRelateBusinessAndRelateId(Integer relateBusiness, Long relateId);
}
